<template>
  <div class="dashboard-container">
    <main>
      <el-table :data="tableData" style="width: 100%">
        <el-table-column prop="id" label="序号" width="180"> </el-table-column>
        <el-table-column prop="code" label="编号" width="380">
        </el-table-column>
        <el-table-column prop="name" label="名称" width="380">
        </el-table-column>
        <el-table-column prop="diseasesInfo" label="病虫害情况" width="380">
        </el-table-column>
        <!-- <el-table-column prop="fertilizeInfo" label="施肥情况">
        </el-table-column> -->
        <el-table-column prop="createTime" label="创建时间"> </el-table-column>
      </el-table>
      <el-pagination
        style="float: right"
        background
        layout="prev, pager, next"
        :total="100"
      >
      </el-pagination>
    </main>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import { getInspectionInfoList } from "@/api/protect";
export default {
  name: "Dashboard",
  computed: {
    ...mapGetters(["name"]),
  },
  components: {},
  data() {
    return {
      tableData: [],
    };
  },
  mounted() {
    this.getInspectionInfoList();
  },
  methods: {
    getInspectionInfoList() {
      getInspectionInfoList({ currentPage: 1, pageSize: 100 }).then((res) => {
        console.log(res);
        this.tableData = res.data;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
